package com.njwb.mapper;

import com.njwb.entity.Emp;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Description: 类的描述
 * Author: yuandeyin@itany.com
 * Date: 2025-08-11 16:00
 * Version: 1.0
 */
public class EmpRowMapping implements  RowMapping<Emp>{
    @Override
    public Emp mapper(ResultSet rs) throws SQLException {
        Emp emp = new Emp();
        emp.setEmpNo(rs.getInt("empno"));
        emp.setEname(rs.getString("ename"));
        emp.setJob(rs.getString("job"));
        emp.setDeptNo(rs.getInt("deptno"));
        return emp;
    }
}
